import { useNavigate } from "react-router-dom"


const FloatListCard = ({title , moreRoute , children}:{title:string , moreRoute:string,  children: React.ReactNode}) =>{

  const nav = useNavigate()

  function tomore(){
    nav(moreRoute)
  }

  return (
    <div className="floatListCard">
      <div className="flex items-center place-content-between">
        <span className="t3 text-sm	">{title}</span>

        <span className="text-stone-400	text-xs	" onClick={tomore}>查看更多</span>
      </div>

      <div className="list flex items-center">
        {children}
      </div>

    </div>
  )
}

export default FloatListCard